import 'package:flutter/material.dart';
import 'package:mobile_app.core/core/presentation/theme/theme.dart';

class PlatformDivider extends StatelessWidget {
  const PlatformDivider({
    super.key,
  })  : indentColor = Colors.transparent,
        indent = 0,
        endIndent = 0;

  const PlatformDivider.withIndent({
    required this.indentColor,
    double? indent,
    double? endIndent,
    super.key,
  })  : indent = indent ?? 0,
        endIndent = endIndent ?? 0;

  final Color indentColor;
  final double indent;
  final double endIndent;

  @override
  Widget build(BuildContext context) {
    // final thickness = MediaQuery.of(context).devicePixelRatio < 2
    //     ? 0.0
    //     : 1 / MediaQuery.of(context).devicePixelRatio;

    return Divider(
      color: CoreTheme.of(context).dividerColor,
      height: 0,
      thickness: 1.0,
      indent: indent,
      endIndent: endIndent,
    );

    // return Container(
    //   width: double.infinity,
    //   color: indentColor,
    //   child: Padding(
    //     padding: EdgeInsets.only(
    //       left: indent,
    //       right: endIndent,
    //     ),
    //     child: Container(
    //       color: CoreTheme.of(context).dividerColor,
    //       height: thickness,
    //       child: Divider(
    //         color: CoreTheme.of(context).dividerColor,
    //         height: 0,
    //         thickness: thickness,
    //       ),
    //     ),
    //   ),
    // );
  }
}
